package com.rd.student.ruanjian.class1.duhang.exam;

import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
import java.io.Writer;
import java.util.Scanner;

public class TestStudent {
    public static void main(String[] args) throws IOException {
        Scanner scanner = new Scanner(System.in);
        File file = new File("D:rd2304\\src\\com\\rd\\student\\ruanjian\\class1\\duhang\\exam");
        Writer writer = new FileWriter("Student.txt");
        for (int i = 0; i < 3; i++) {
            System.out.println("输入学生姓名");
            String name0 = scanner.next();
            System.out.println("输入语文成绩");
            int scorec = scanner.nextInt();
            System.out.println("输入数学成绩");
            int scorem = scanner.nextInt();

            Student student = new Student(name0,scorec,scorem,scorec+scorem);
            System.out.println("学生" + i+1 + "信息录入完毕");
        }
        String a =scanner.toString();
        Input input = new Input();
        input.write(a);
    }
}
